<template>
    <!-- 规格卡片 -->
    <el-form label-width="80px" class="text-align-left">
        <el-form-item label="添加规格">
            <div class="card" style="line-height:1.2;">
                <div class="card-header d-flex align-items-center">
                    规格项：<el-input size="mini" style="width:200px;">
                        <el-button slot="append" icon="el-icon-more"></el-button>
                    </el-input>
                    <el-radio-group size="mini" style="margin-bottom: -10px; margin-left: 5px;">
                        <el-radio label="0">无</el-radio>
                        <el-radio label="1">颜色</el-radio>
                        <el-radio label="2">图片</el-radio>
                    </el-radio-group>
                    <!-- 自动将自己推向右边class="ml-auto" -->
                    <el-button class="ml-auto" icon="el-icon-top" size="mini"> </el-button>
                    <el-button icon="el-icon-top" size="mini"> </el-button>
                    <el-button type="text" size="mini"> 删除 </el-button>
                </div>
                <div class="card-body">
                    <div>
                        <el-button type="text" size="mini" icon="el-icon-plus">增加规格值</el-button>
                    </div>
                </div>
            </div>
            <el-button type="success" class="mt-3" size="mini">添加规格</el-button>
        </el-form-item>
    </el-form>

    <el-form>
        <el-form-item label="批量设置">
            <el-button type="text">销售价</el-button>
            <el-button type="text">市场价</el-button>
            <el-button type="text">成本价</el-button>
            <el-button type="text">库存</el-button>
            <el-button type="text">体积</el-button>
            <el-button type="text">重量</el-button>
        </el-form-item>
        <el-form-item label="规格设置">

        </el-form-item>
    </el-form>

</template>
<script>
import { mapState, mapMutations } from 'vuex';

export default {
    data() {
        return {

        }
    },
    computed: {
        ...mapState('goods_create', {

        }),
        //    其他计算属性
    },
    methods: {
        // 修改state方法二
        ...mapMutations('goods_create', ['vModelState']),
        // 修改表单的值
        vModel(key, value) {
            this.vModelState({
                key,
                value
            })
        }

    }
}
</script>